<template>
  <div class="index-wrapper">
    <v-search @searchGoodsName="searchGoodsNameFn"/>
    <v-category @where="whereFn"/>
    <div class="index-main">
      <v-banner/>
      <v-goods-list :goodsWhere="goodsWhere" :searchGoodsName="searchGoodsName"/>
    </div>
  </div>
</template>

<script>
export default {
  name: "home",
  data() {
    return {
      searchGoodsName: '',
      goodsWhere: {}
    }
  },
  components: {
    'v-search': () => import('@/components/common/search/search'),
    'v-category': () => import('@/components/common/category/category'),
    'v-goods-list': () => import('@/components/goods/list'),
    'v-banner': () => import('@/components/common/banner/banner')
  },
  methods: {
    jump(jumpUrl){
      window.location.href = jumpUrl;
    },
    whereFn(value){
      this.goodsWhere = value;
    },
    searchGoodsNameFn(searchGoodsName){
      this.searchGoodsName = searchGoodsName;
    }
  }
}
</script>

<style scoped>

</style>